﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="coupons_allotment_edit.aspx.cs" Inherits="Donal.Xms.Web.qianyi.common.coupons_allotment_edit" ValidateRequest="false" %>

<%@ Import Namespace="Donal.Xms.Common" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>查看分配优惠券</title>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <link rel="stylesheet" type="text/css" href="../../scripts/artdialog/ui-dialog.css" />
    <link rel="stylesheet" type="text/css" href="../skin/icon/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="../skin/default/style.css" />
    <script type="text/javascript" charset="utf-8" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/jquery/Validform_v5.3.2_min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/datepicker/WdatePicker.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/artdialog/dialog-plus-min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../scripts/webuploader/webuploader.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/uploader.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/common.js"></script>
    <script type="text/javascript" charset="utf-8" src="../js/laymain.js"></script>
    <script type="text/javascript">
        $(function () {

            //初始化上传控件
            $(".upload-img").InitUploader({ filesize: "<%=sysConfig.imgsize %>", sendurl: "../../tools/upload_ajax.ashx", swf: "../../scripts/webuploader/uploader.swf", filetypes: "<%=sysConfig.fileextension %>" });

            setImagesAndContents();

            function setImagesAndContents() {
                var imgUrl = "";
                var txtContents = "";
                var timer = setInterval(function () {

                    if ($("input[id$='txtImgUrl']").val() != $("#img_page").attr("src")) {
                        imgUrl = $("input[id$='txtImgUrl']").val();
                        $("#img_page").attr("src", imgUrl);
                        $("input[id$='hidImg']").val(imgUrl);
                    }
                }, 200);
            };

            switch ($("#hidExpiration_form").val()) {
                case "0":
                    $("#dlExpiration").hide();
                    $("#dlstart").show();
                    $("#dlend").show();
                    break;
                case "1":
                    $("#dlExpiration").show();
                    $("#dlstart").hide();
                    $("#dlend").hide();
                    break;
                case "2":
                    $("#dlExpiration").hide();
                    $("#dlstart").hide();
                    $("#dlend").hide();
                    break;
            }
        });
    </script>
    <style type="text/css">
        .tree-list .col-1 {
            padding-left: 1%;
            width: 10%;
        }

        .tree-list .col-2 {
            width: 83%;
        }

        .tree-list .col-3 {
            width: 5%;
            text-align: center;
        }
    </style>
</head>

<body class="mainbody">
    <form id="form1" runat="server">
        <!--导航栏-->
        <div class="location">
            <a href="coupons_allotment_list.aspx" class="back"><i class="iconfont icon-up"></i><span>返回列表页</span></a>
            <a href="../center.aspx"><i class="iconfont icon-home"></i><span>首页</span></a>
            <i class="arrow iconfont icon-arrow-right"></i>
            <span>分配管理</span>
            <i class="arrow iconfont icon-arrow-right"></i>
            <span>查看分配优惠券</span>
        </div>
        <div class="line10"></div>
        <!--/导航栏-->

        <!--内容-->
        <div id="floatHead" class="content-tab-wrap">
            <div class="content-tab">
                <div class="content-tab-ul-wrap">
                    <ul>
                        <li><a class="selected" href="javascript:;">优惠券信息</a></li>
                        <li><a href="javascript:;">样式</a></li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="tab-content">

            <dl>
                <dt>会员名称</dt>
                <dd>
                    <asp:TextBox ID="txtCompany" runat="server" CssClass="input normal" Width="200" Enabled="false" />
                </dd>
            </dl>
            <dl>
                <dt>订单号</dt>
                <dd>
                    <asp:TextBox ID="txtOrderNo" runat="server" CssClass="input normal" Width="200" Enabled="false" />
                </dd>
            </dl>
            <dl>
                <dt>优惠券名称</dt>
                <dd>
                    <asp:TextBox ID="txtTitle" runat="server" CssClass="input normal" Width="200" Enabled="false" />
                </dd>
            </dl>
            <dl>
                <dt>到期状态</dt>
                <dd>
                    <asp:TextBox ID="txtOverName" runat="server" CssClass="input normal" Width="200" Enabled="false" />
                </dd>
            </dl>
            <dl>
                <dt>分配时间</dt>
                <dd>
                    <asp:TextBox ID="txtAllotment" runat="server" CssClass="input normal" Width="200" Enabled="false" />
                </dd>
            </dl>

            <dl>
                <dt>门槛</dt>
                <dd>
                    <asp:TextBox ID="txtConditions_amount" runat="server" CssClass="input small" Enabled="false">0</asp:TextBox>
                    元                    
                   
                </dd>
            </dl>
            <dl id="dlAmount">
                <dt>优惠金额</dt>
                <dd>
                    <asp:TextBox ID="txtAmount" runat="server" CssClass="input small" Enabled="false">0</asp:TextBox>
                    元                    
                    
                </dd>
            </dl>
            <dl>
                <dt>叠加使用</dt>
                <dd>
                    <div class="rule-multi-radio">
                        <asp:RadioButtonList ID="rblSuperposition" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" Enabled="false">
                            <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                            <asp:ListItem Value="0">否</asp:ListItem>
                        </asp:RadioButtonList>
                    </div>
                </dd>
            </dl>
            <dl>
                <dt>适用品类</dt>
                <dd>
                    <div class="tree-list">
                        <div class="thead">
                            <div class="col col-1">品类名称</div>
                            <div class="col col-2">选择适用</div>
                            <div class="col col-3"></div>
                        </div>
                        <ul>
                            <asp:Repeater ID="rptList" runat="server" OnItemDataBound="rptList_ItemDataBound">
                                <ItemTemplate>
                                    <li class="layer-<%#Eval("class_layer")%>">
                                        <div class="tbody">
                                            <div class="col index col-1">
                                                <asp:HiddenField ID="hidId" runat="server" Value='<%#Eval("id") %>' />
                                                <%#Eval("title")%>
                                            </div>
                                            <div class="col col-2">
                                                <asp:RadioButtonList ID="cblActionType" Enabled="false" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="cbllist"></asp:RadioButtonList>
                                            </div>
                                            <div class="col col-3">
                                            </div>
                                        </div>
                                    </li>
                                </ItemTemplate>
                            </asp:Repeater>
                        </ul>
                    </div>
                </dd>
            </dl>
            <dl>
                <dt>关联使用</dt>
                <dd>
                    <div class="tree-list">
                        <div class="thead">
                            <div class="col col-2" style="margin-left: 20px; width: 93%">优惠券名称</div>
                            <div class="col col-3">全选</div>
                        </div>
                        <ul>
                            <li>
                                <div class="tbody">
                                    <div class="col col-2" style="margin-left: 20px; width: 93%">
                                        <asp:CheckBoxList ID="cblCoupons" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="cbllist" Enabled="false"></asp:CheckBoxList>
                                    </div>
                                    <div class="col col-3">
                                        <input name="checkAll" type="checkbox" />
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </dd>
            </dl>

            <dl>
                <dt>描述</dt>
                <dd>
                    <asp:TextBox ID="txtContents" runat="server" CssClass="input normal" Width="300" Height="100" TextMode="MultiLine" Enabled="false" />

                </dd>
            </dl>

            <dl>
                <dt>失效形式</dt>
                <dd>
                    <input type="hidden" id="hidExpiration_form" value="<%=hidExpiration_form %>" />
                    <div class="rule-multi-radio">
                        <asp:RadioButtonList ID="cblExpiration_form" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" Enabled="false">
                            <asp:ListItem Value="0" Selected="True">自动过期</asp:ListItem>
                            <asp:ListItem Value="1">分配后在指定天数后过期</asp:ListItem>
                            <asp:ListItem Value="2">永不过期</asp:ListItem>
                        </asp:RadioButtonList>
                    </div>
                </dd>
            </dl>

            <dl id="dlExpiration" style="display: none">
                <dt>指定过期天数</dt>
                <dd>
                    <asp:TextBox ID="txtExpiration_num" runat="server" CssClass="input small" Width="200" Enabled="false" />

                </dd>
            </dl>


            <dl id="dlstart">
                <dt>开始日期</dt>
                <dd>
                    <asp:TextBox ID="txtStart_time" runat="server" CssClass="input rule-date-input" Enabled="false" />

                </dd>
            </dl>
            <dl id="dlend">
                <dt>结束日期</dt>
                <dd>
                    <asp:TextBox ID="txtEnd_time" runat="server" CssClass="input rule-date-input" Enabled="false" />

                </dd>
            </dl>

            <dl>
                <dt>创建时间</dt>
                <dd>
                    <asp:TextBox ID="txtAdd_time" runat="server" CssClass="input rule-date-input" Enabled="false" />

                </dd>
            </dl>

        </div>

        <div class="tab-content" style="display: none">
            <dl>
                <dt>背景色</dt>
                <dd>
                    <asp:TextBox ID="txtBackcolor" runat="server" CssClass="input normal" Width="200" Enabled="false" sucmsg=" " />

                </dd>
            </dl>
            <dl>
                <dd>
                    <div class="photo-list">
                        <ul>
                            <li>
                                <div class="img-box">
                                    <img src="../dialog/images/img_plus.jpg" id="img_page">
                                </div>
                            </li>
                        </ul>
                    </div>
                </dd>
            </dl>
            <dl>
                <dt>图标</dt>
                <dd>
                    <asp:TextBox ID="txtImgUrl" runat="server" Enabled="false" CssClass="input normal upload-path" />
                </dd>
            </dl>

        </div>

        <!--/内容-->

        <!--工具栏-->
        <div class="page-footer">
            <div class="btn-wrap">
                <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript: history.back(-1);" />
            </div>
        </div>
        <!--/工具栏-->

    </form>
</body>
</html>

